// Set location to centre on
//var myCenter = new google.maps.LatLng(26.06686213257888, 128.84765625);
alert($('#map_x').val());
alert($('#map_y').val());

var myCenter = new google.maps.LatLng($('#map_x').val(), $('#map_y').val());

// Set other locations in array first title for marker, second coords
var locations = [ [ 'marker title1', -13.530825, -71.957565 ] ];

function initialize() {

	// apply location marker to centre on
	var mapProp = {
		center : myCenter,
		zoom : 5,
		mapTypeId : google.maps.MapTypeId.ROADMAP
	};

	var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);

	var marker = new google.maps.Marker({
		position : myCenter,
		title : 'My centre location marker',
		icon:'images/pinkball.png'
	});

	marker.setMap(map);



	google.maps.event.addListener(map, "click", function(event) {
		var lat = event.latLng.lat();
		var lng = event.latLng.lng();
		$('#coord_x').val(lat);
		$('#coord_y').val(lng)
	});

}

google.maps.event.addDomListener(window, 'load', initialize);
